home *** CD-ROM | disk | FTP | other *** search
/ Bubka 15 / Bubka 15.iso / utility / win / msch126i.lzh / Src / ClassMdl.bas < prev    next >
Encoding:
BASIC Source File  |  2001-11-27  |  30.9 KB  |  1,162 lines

  1. Attribute VB_Name = "ClassMdl"
  2. Option Explicit
  3.  
  4. Public Const FILTER_ALL = "æSé─é╠âtâ@âCâï" & vbNullChar & "*.*" & vbNullChar
  5. Public Const FILTER_EXE = "Ä└ìsâtâ@âCâï" & vbNullChar & "*.exe;*.com" & vbNullChar
  6. Public Const FILTER_TXT = "âeâLâXâgâtâ@âCâï" & vbNullChar & "*.doc;*.txt" & vbNullChar
  7. Public Const FILTER_IMG = "âCâüü[âWâtâ@âCâï" & vbNullChar & "*.bmp;*.jpg" & vbNullChar
  8.  
  9. Public Const FILTER_PROGRAM = FILTER_EXE & FILTER_ALL
  10.  
  11. Private mGetErrorNum As Long
  12. '
  13. 'EXEâtâ@âCâïé╠âRâüâôâgé≡ĵô╛é╖éΘè╓Éö
  14. '
  15. Public Function GetFileComment(ByVal strExecuteFile As String) As String
  16.     Dim CFile As ClsFile
  17.     Set CFile = New ClsFile
  18.     
  19.     With CFile
  20.         .strFileName = strExecuteFile
  21.         .GetExecuteInfo
  22.         GetFileComment = .Comment
  23.     End With
  24.     
  25.     Set CFile = Nothing
  26. End Function
  27. '
  28. 'âtâ@âCâïé╠Äφù▐é≡ĵô╛
  29. '
  30. Public Function GetFileTypeInfo(ByVal strFileName As String) As String
  31.     Dim CArcOp As ClsArcOp
  32.     Set CArcOp = New ClsArcOp
  33.     
  34.     GetFileTypeInfo = CArcOp.GetFileTypeEx(strFileName)
  35.     
  36.     Set CArcOp = Nothing
  37. End Function
  38. '
  39. 'Iniâtâ@âCâïé⌐éτâfü[â^é≡ĵô╛(ò╢ÄÜù±î^)
  40. '
  41. Public Function IniReadByString(ByVal Section As String, ByVal EntryName As String) As String
  42.     On Error GoTo ErrLine
  43.     Dim CIni As ClsIniRW
  44.     Set CIni = New ClsIniRW
  45.     
  46.     IniReadByString = CIni.ReadINIData(Section, EntryName)
  47.     
  48.     Set CIni = Nothing
  49.     Exit Function
  50. ErrLine:
  51.     'MsgBox "âGâëü[:IniReadByString , " & _
  52.            "âZâNâVâçâô:" & Section & _
  53.            " âGâôâgâèü[âlü[âÇ:" & EntryName, _
  54.            vbInformation, _
  55.            "âGâëü[:IniReadByString"
  56.     IniReadByString = ""
  57. End Function
  58. '
  59. 'Iniâtâ@âCâïé⌐éτâfü[â^é≡ĵô╛(Æ╖É«Éöî^)
  60. '
  61. Public Function IniReadByLong(ByVal Section As String, ByVal EntryName As String) As Long
  62.     On Error GoTo ErrLine
  63.     Dim CIni As ClsIniRW
  64.     Set CIni = New ClsIniRW
  65.     
  66.     IniReadByLong = CIni.ReadINIData(Section, EntryName)
  67.     
  68.     Set CIni = Nothing
  69.     Exit Function
  70. ErrLine:
  71.     'MsgBox "âGâëü[:IniReadByLong , " & _
  72.            "âZâNâVâçâô:" & Section & _
  73.            " âGâôâgâèü[âlü[âÇ:" & EntryName, _
  74.            vbInformation, _
  75.            "âGâëü[:IniReadByLong"
  76.     IniReadByLong = 0
  77. End Function
  78. '
  79. 'Iniâtâ@âCâïé╔Åæé½ì₧é▌
  80. '
  81. Public Function IniWrite(ByVal Section As String, ByVal EntryName As String, ByVal Value As String) As Boolean
  82.     On Error GoTo ErrLine
  83.     Dim CIni As ClsIniRW
  84.     Set CIni = New ClsIniRW
  85.     
  86.     Call CIni.WriteINIData(Section, EntryName, Value)
  87.     IniWrite = True
  88.     
  89.     Set CIni = Nothing
  90.     Exit Function
  91. ErrLine:
  92.     MsgBoxEx "âGâëü[:INIWrite , " & "âZâNâVâçâô:" & Section & _
  93.              "âGâôâgâèü[âlü[âÇ:" & EntryName, vbInformation, _
  94.              "âGâëü[:INIWrite"
  95.     IniWrite = False
  96. End Function
  97. Public Sub FileExecute(ByVal strFileName As String, ByVal hWnd As Long)
  98.     Dim CShell As ClsShell
  99.     Set CShell = New ClsShell
  100.     
  101.     With CShell
  102.         .strFileName = strFileName
  103.         .TargethWnd = hWnd
  104.         .ExecuteFile
  105.     End With
  106.     
  107.     Set CShell = Nothing
  108. End Sub
  109. '
  110. 'æ╬Å█âtâ@âCâïé╠û╝æOé≡ò╧ìXé╡é▄é╖üB(API)
  111. '
  112. Public Function FileRename(ByVal hWnd As Long, ByVal strFileName As String, ByVal BeforeName As String) As Long
  113.     Dim CShell As ClsShell
  114.     Set CShell = New ClsShell
  115.     With CShell
  116.         .strFileName = strFileName
  117.         .TargethWnd = hWnd
  118.         FileRename = .ShellRename(BeforeName)
  119.     End With
  120.     
  121.     Set CShell = Nothing
  122. End Function
  123. '
  124. 'æ╬Å█âtâ@âCâïé≡ìφÅ£é╡é▄é╖üB(âSâ~öáìsé½,API)
  125. '
  126. Public Sub FileDelete(ByVal hWnd As Long, ByVal strFileName As String)
  127.     Dim CShell As ClsShell
  128.     Set CShell = New ClsShell
  129.     
  130.     With CShell
  131.         .strFileName = strFileName
  132.         .TargethWnd = hWnd
  133.         .ShellDelete
  134.     End With
  135.     
  136.     Set CShell = Nothing
  137. End Sub
  138. '
  139. 'âtâ@âCâïé╠âvâìâpâeâBé≡ò\Īé╡é▄é╖üB(òíÉöûóæ╬ë₧)
  140. '
  141. Public Sub FileProperty(ByVal hWnd As Long, ByVal strFileName As String)
  142.     Dim CShell As ClsShell
  143.     Set CShell = New ClsShell
  144.     
  145.     With CShell
  146.         .strFileName = strFileName
  147.         .TargethWnd = hWnd
  148.         .ShellProperty
  149.     End With
  150.     
  151.     Set CShell = Nothing
  152. End Sub
  153. '
  154. 'îƒì⌡ëµû╩é≡Åoé╡é▄é╖üB
  155. '
  156. Public Sub FileSearch(ByVal hWnd As String, ByVal strFileName As String)
  157.     Dim CShell As ClsShell
  158.     Set CShell = New ClsShell
  159.     
  160.     With CShell
  161.         .strFileName = strFileName
  162.         .TargethWnd = hWnd
  163.         .SearchFilePath
  164.     End With
  165.     
  166.     Set CShell = Nothing
  167. End Sub
  168. '
  169. 'WindowsâtâHâïâ_é╠ê╩Æué≡ĵô╛é╡é▄é╖üB
  170. '
  171. Public Property Get GetWindowsPath(Optional ByVal blnSlash As Boolean = True) As String
  172.     Dim CPath As ClsPath
  173.     Set CPath = New ClsPath
  174.     If blnSlash = True Then
  175.         GetWindowsPath = CPath.GetWindowsDir & "\"
  176.     Else
  177.         GetWindowsPath = CPath.GetWindowsDir
  178.     End If
  179.     Set CPath = Nothing
  180. End Property
  181. '
  182. 'SystemâtâHâïâ_é╠ê╩Æué≡ĵô╛é╡é▄é╖üB
  183. '
  184. Public Property Get GetSystemPath(Optional ByVal blnSlash As Boolean = True) As String
  185.     Dim CPath As ClsPath
  186.     Set CPath = New ClsPath
  187.     If blnSlash = True Then
  188.         GetSystemPath = CPath.GetSystemDir & "\"
  189.     Else
  190.         GetSystemPath = CPath.GetSystemDir
  191.     End If
  192.     Set CPath = Nothing
  193. End Property
  194. '
  195. 'TempâtâHâïâ_é╠ê╩Æué≡ĵô╛é╡é▄é╖üB
  196. '
  197. Public Property Get GetTempPath(Optional ByVal blnSlash As Boolean = True, Optional ByVal blnmschTmp As Boolean = False) As String
  198.     Dim CPath As ClsPath
  199.     Set CPath = New ClsPath
  200.     If blnSlash = True Then
  201.         If blnmschTmp = False Then
  202.             GetTempPath = CPath.GetTempDir
  203.         Else
  204.             GetTempPath = CPath.GetTempDir & "mschtmp\"
  205.         End If
  206.     Else
  207.         If blnmschTmp = False Then
  208.             GetTempPath = Mid$(CPath.GetTempDir, 1, Len(CPath.GetTempDir) - 1)
  209.         Else
  210.             GetTempPath = CPath.GetTempDir & "mschtmp"
  211.         End If
  212.     End If
  213.     
  214.     Set CPath = Nothing
  215. End Property
  216. '
  217. 'Program FilesâtâHâïâ_é╠ê╩Æué≡ĵô╛é╡é▄é╖üB
  218. '
  219. Public Property Get GetProgramFilesPath(Optional ByVal blnSlash As Boolean = True) As String
  220.     Dim CPath As ClsPath
  221.     Set CPath = New ClsPath
  222.     If blnSlash = True Then
  223.         GetProgramFilesPath = CPath.GetProgramFilesDir & "\"
  224.     Else
  225.         GetProgramFilesPath = CPath.GetProgramFilesDir
  226.     End If
  227.     Set CPath = Nothing
  228. End Property
  229. '
  230. 'âfâXâNâgâbâvé╠ê╩Æué≡ĵô╛é╡é▄é╖üB
  231. '
  232. Public Property Get GetDeskTopPath(Optional ByVal blnSlash As Boolean = True) As String
  233.     Dim CPath As ClsPath
  234.     Set CPath = New ClsPath
  235.     If blnSlash = True Then
  236.         GetDeskTopPath = CPath.GetDesktop & "\"
  237.     Else
  238.         GetDeskTopPath = CPath.GetDesktop
  239.     End If
  240.     Set CPath = Nothing
  241. End Property
  242. '
  243. 'â}âCâhâLâàâüâôâgé╠ê╩Æué≡ĵô╛é╡é▄é╖üB
  244. '
  245. Public Property Get GetMyDocumentPath(Optional ByVal blnSlash As Boolean = True) As String
  246.     Dim CPath As ClsPath
  247.     Set CPath = New ClsPath
  248.     If blnSlash = True Then
  249.         GetMyDocumentPath = CPath.GetMyDocument & "\"
  250.     Else
  251.         GetMyDocumentPath = CPath.GetMyDocument
  252.     End If
  253.     Set CPath = Nothing
  254. End Property
  255. '
  256. 'âåü[âUü[é╠PCé╔âCâôâXâgü[âïé│éΩé─éóéΘWindowsé╠Äφù▐é≡ĵô╛é╡é▄é╖üB
  257. '
  258. Public Function GetOSVer() As String
  259.     Dim CInfo As ClsSysInfo
  260.     Set CInfo = New ClsSysInfo
  261.     
  262.     GetOSVer = CInfo.GetWinVersion
  263.     
  264.     Set CInfo = Nothing
  265. End Function
  266. '
  267. 'âåü[âUü[é╠PCé╔âCâôâXâgü[âïé│éΩé─éóéΘInternetExploreré╠âoü[âWâçâôé≡ĵô╛é╡é▄é╖üB
  268. '
  269. Public Function GetIEVer() As String
  270.     Dim CInfo As ClsSysInfo
  271.     Set CInfo = New ClsSysInfo
  272.     
  273.     GetIEVer = CInfo.GetIEVersion
  274.     
  275.     Set CInfo = Nothing
  276. End Function
  277. '
  278. 'ÄwÆΦé╡é╜âhâëâCâué╠ï≤é½ùeù╩é≡ĵô╛é╡é▄é╖üB
  279. '
  280. Public Function GetDriveVolume(ByVal strDriveRoot As String) As Long
  281.     On Error GoTo ErrLine
  282.     Dim CInfo As ClsSysInfo
  283.     Set CInfo = New ClsSysInfo
  284.     
  285.     With CInfo
  286.         .strFileName = Left$(strDriveRoot, 3)
  287.         GetDriveVolume = .GetDriveFreeSpace
  288.     End With
  289.     
  290.     Set CInfo = Nothing
  291.     Exit Function
  292. ErrLine:
  293.     Set CInfo = Nothing
  294.     GetDriveVolume = -1
  295. End Function
  296. '
  297. 'âtâ@âCâïé╠û╝æOé≡ò╧ìXé╡é▄é╖üB
  298. '
  299. Public Function ChangeFileName(ByVal strBefore As String, ByVal strAfter As String) As Boolean
  300.     On Error GoTo ErrLine
  301.     Name strBefore As strAfter
  302.     ChangeFileName = True
  303.     Exit Function
  304. ErrLine:
  305.     ChangeFileName = False
  306. End Function
  307. '
  308. '[âtâHâïâ_é╠æIæ≡]â_âCâAâìâOé≡ò\Īé╡é▄é╖üBé╚é¿üAûûö÷é╔"\"é¬Ä⌐ô«ôIé╔òtë┴é│éΩé▄é╖üB
  309. '
  310. Public Function GetFolderDialogPath(ByVal hWnd As Long, ByVal strTitle As String) As String
  311.     Dim CShell As ClsShell
  312.     Set CShell = New ClsShell
  313.     
  314.     With CShell
  315.         .TargethWnd = hWnd
  316.         GetFolderDialogPath = .OpenFolderDialog(strTitle)
  317.     End With
  318.     
  319.     Set CShell = Nothing
  320. End Function
  321. '
  322. 'âtâ@âCâïé╠æIæ≡â_âCâAâìâOé≡ò\Īé╡é▄é╖üB
  323. '
  324. Public Function GetOpenFileDialogPath(ByVal hWnd As Long, ByVal strFilter As String, ByVal strDef As String, ByVal strTitle As String) As String
  325.     Dim CShell As ClsShell
  326.     Set CShell = New ClsShell
  327.     
  328.     With CShell
  329.         .TargethWnd = hWnd
  330.         GetOpenFileDialogPath = .OpenFileDialog(strFilter, strDef, strTitle)
  331.     End With
  332.     
  333.     Set CShell = Nothing
  334. End Function
  335. '
  336. 'Åæî╔âtâ@âCâïé╠Äφù▐é≡Æ▓é╫é▄é╖üBé▒é┐éτé═üAâTü[â`âoâbâtâ@é≡ÄwÆΦé╖éΘé▒é╞é¬é┼é½é▄é╖üB
  337. '
  338. Public Function GetFileTypeSearch(ByVal strFileName As String, ByVal hWnd As Long, Optional ByVal BufSize As Long = 131072) As Long
  339.     Dim CFile As ClsFile
  340.     Set CFile = New ClsFile
  341.     
  342.     With CFile
  343.         .strFileName = strFileName
  344.         .TargethWnd = hWnd
  345.         GetFileTypeSearch = .GetArcSearch(BufSize)
  346.     End With
  347.     Set CFile = Nothing
  348. End Function
  349. '
  350. 'ò¬èäâtâ@âCâïé╠Äφù▐é≡ô┴ÆΦé╡é▄é╖üB
  351. '
  352. Public Function GetDivFileTypeSearch(ByVal strFileName As String) As Long
  353.     Dim CCmb As ClsCmbFile
  354.     Set CCmb = New ClsCmbFile
  355.     
  356.     With CCmb
  357.         .strFileName = strFileName
  358.         GetDivFileTypeSearch = .DivCheckFile
  359.     End With
  360.     
  361.     Set CCmb = Nothing
  362. End Function
  363. '
  364. 'âtâ@âCâïé≡ì∞ɼé╡é▄é╖üB
  365. '
  366. Public Sub WriteFile(ByVal strBuffer As String, ByVal strOutPut As String, Optional ByVal blnOverWrite As Boolean = True)
  367.     Dim CFile As ClsFile
  368.     Set CFile = New ClsFile
  369.     Debug.Print strOutPut
  370.     With CFile
  371.         .strOutPut = strOutPut
  372.         Call .WriteBufferToFile(strBuffer, blnOverWrite)
  373.     End With
  374.     
  375.     Set CFile = Nothing
  376. End Sub
  377. '
  378. '
  379. '
  380. Public Property Get GetDivDialog() As Long
  381.     Dim lngResult As Long
  382.     
  383.     lngResult = IniReadByLong("ArcSetting_02", "DivDialog")
  384.     
  385.     Select Case lngResult
  386.         Case 0, 1
  387.             GetDivDialog = lngResult
  388.         Case Else
  389.             GetDivDialog = 0
  390.     End Select
  391. End Property
  392. '
  393. '
  394. '
  395. Public Property Get GetArcDialog() As Long
  396.     Dim lngResult As Long
  397.     
  398.     lngResult = IniReadByLong("ArcSetting_02", "ArcDialog")
  399.     
  400.     Select Case lngResult
  401.         Case 0, 1
  402.             GetArcDialog = lngResult
  403.         Case Else
  404.             GetArcDialog = 0
  405.     End Select
  406. End Property
  407. '
  408. '
  409. '
  410. Public Property Get UnlhaListCommand() As String
  411.     Dim lngResult As Long
  412.     
  413.     lngResult = IniReadByLong("ListFile", "UnlhaListMode")
  414.     
  415.     Select Case lngResult
  416.         Case 0
  417.             UnlhaListCommand = "l"
  418.         Case 1
  419.             UnlhaListCommand = "v"
  420.         Case Else
  421.             UnlhaListCommand = "v"
  422.     End Select
  423.     
  424. End Property
  425. '
  426. '
  427. '
  428. Public Property Get UnZipListCommand() As String
  429.     Dim lngResult As Long
  430.     
  431.     lngResult = IniReadByLong("ListFile", "UnZipListMode")
  432.     
  433.     Select Case lngResult
  434.         Case 0
  435.             UnZipListCommand = "-l"
  436.         Case 1
  437.             UnZipListCommand = "-lv"
  438.         Case 2
  439.             UnZipListCommand = "-v"
  440.         Case Else
  441.             UnZipListCommand = "-v"
  442.     End Select
  443. End Property
  444. '
  445. '
  446. '
  447. Public Property Get CabListCommand() As String
  448.     CabListCommand = "-l"
  449. End Property
  450. '
  451. '
  452. '
  453. Public Property Get UnArjListCommand() As String
  454.     Dim lngResult As Long
  455.     
  456.     lngResult = IniReadByLong("ListFile", "UnArjListMode")
  457.     
  458.     Select Case lngResult
  459.         Case 0
  460.             UnArjListCommand = "l"
  461.         Case 1
  462.             UnArjListCommand = "v"
  463.         Case 2
  464.             UnArjListCommand = "lv"
  465.         Case 3
  466.             UnArjListCommand = "vv"
  467.         Case Else
  468.             UnArjListCommand = "v"
  469.     End Select
  470.     
  471. End Property
  472. '
  473. '
  474. '
  475. Public Property Get UnlhaCommand() As String
  476.     Dim strCommand As String
  477.     Dim lngResult As Long
  478.     
  479.     lngResult = IniReadByLong("ArcSetting_02", "UnlhaFileElement")
  480.     
  481.     If lngResult = 1 Then
  482.         strCommand = " -a0"
  483.     Else
  484.         strCommand = " -a1"
  485.     End If
  486.     
  487.     lngResult = IniReadByLong("ArcSetting_02", "UnlhaAllQYes")
  488.     
  489.     If lngResult = 1 Then
  490.         strCommand = strCommand & " -y1"
  491.     End If
  492.  
  493.     
  494.     lngResult = IniReadByLong("ArcSetting_02", "UnlhaUnExistFile")
  495.     
  496.     If lngResult = 1 Then
  497.         strCommand = strCommand & " -u1"
  498.     End If
  499.     
  500.     lngResult = IniReadByLong("ArcSetting_02", "UnlhaIgnoreErr")
  501.     
  502.     If lngResult = 1 Then
  503.         strCommand = strCommand & " -jc1"
  504.     End If
  505.     
  506.     lngResult = IniReadByLong("ArcSetting_02", "UnlhaAllErrYes")
  507.     
  508.     If lngResult = 1 Then
  509.         strCommand = strCommand & " -gm1"
  510.     End If
  511.     
  512.     lngResult = IniReadByLong("ArcSetting_02", "UnlhaReadOnly")
  513.     
  514.     If lngResult = 1 Then
  515.         strCommand = strCommand & " -ga1"
  516.     End If
  517.     
  518.     UnlhaCommand = "x -m1 -x1 -jf0 -n1 -gp0" & strCommand
  519.     Debug.Print "UnlhaCommand: " & UnlhaCommand
  520. End Property
  521. '
  522. '
  523. '
  524. Public Property Get UnZipCommand() As String
  525.     Dim strCommand As String
  526.     Dim lngResult As Long
  527.     
  528.     lngResult = IniReadByLong("ArcSetting_01", "UnZipIgnoreFolder")
  529.     
  530.     If lngResult = 1 Then
  531.         strCommand = strCommand & " -j"
  532.     End If
  533.     
  534.     lngResult = IniReadByLong("ArcSetting_01", "UnZipNotOverWrite")
  535.     
  536.     If lngResult = 1 Then
  537.         strCommand = strCommand & " -n"
  538.     End If
  539.     
  540.     lngResult = IniReadByLong("ArcSetting_01", "UnZipOverWrite")
  541.     
  542.     If lngResult = 1 Then
  543.         strCommand = strCommand & " -o"
  544.     End If
  545.     
  546.     lngResult = IniReadByLong("ArcSetting_01", "UnZipSilentInfo")
  547.     
  548.     If lngResult = 1 Then
  549.         strCommand = strCommand & " -qq"
  550.     End If
  551.     
  552.     UnZipCommand = "-x --i" & strCommand
  553.     Debug.Print "UnZipCommand: " & UnZipCommand
  554. End Property
  555. '
  556. '
  557. '
  558. Public Property Get CabCommand() As String
  559.     Dim strCommand As String
  560.     Dim lngResult As Long
  561.  
  562.     lngResult = IniReadByLong("ArcSetting_01", "Cab32IgnoreFolder")
  563.     
  564.     If lngResult = 1 Then
  565.         strCommand = strCommand & " -j"
  566.     End If
  567.     
  568.     lngResult = IniReadByLong("ArcSetting_01", "Cab32UnExistFile")
  569.     
  570.     If lngResult = 1 Then
  571.         strCommand = strCommand & " -n"
  572.     End If
  573.     
  574.     lngResult = IniReadByLong("ArcSetting_01", "Cab32OverWrite")
  575.     
  576.     If lngResult = 1 Then
  577.         strCommand = strCommand & " -o"
  578.     End If
  579.     
  580.     CabCommand = "-x -i" & strCommand
  581.     Debug.Print "CabCommand: " & CabCommand
  582. End Property
  583. '
  584. '
  585. '
  586. Public Property Get UnArjCommand() As String
  587.     Dim strCommand As String
  588.     Dim lngResult As Long
  589.     
  590.     lngResult = IniReadByLong("ArcSetting_01", "UnArjExistFile")
  591.     
  592.     If lngResult = 1 Then
  593.         strCommand = " -f+"
  594.     End If
  595.     
  596.     lngResult = IniReadByLong("ArcSetting_01", "UnArjUnExistFile")
  597.     
  598.     If lngResult = 1 Then
  599.         strCommand = strCommand & " -n+"
  600.     End If
  601.     
  602.     lngResult = IniReadByLong("ArcSetting_01", "UnArjAllQYes")
  603.     
  604.     If lngResult = 1 Then
  605.         strCommand = strCommand & " -y+"
  606.     End If
  607.     
  608.     lngResult = IniReadByLong("ArcSetting_01", "UnArjIgnoreErr")
  609.     
  610.     If lngResult = 1 Then
  611.         strCommand = strCommand & " -jr+"
  612.     End If
  613.     
  614.     lngResult = IniReadByLong("ArcSetting_01", "UnArjAllErrYes")
  615.     
  616.     If lngResult = 1 Then
  617.         strCommand = strCommand & " -hm+"
  618.     End If
  619.     
  620.     UnArjCommand = "x -i+" & strCommand
  621.     Debug.Print "UnArjCommand: " & UnArjCommand
  622. End Property
  623. '
  624. '
  625. '
  626. Public Property Get UnGCACommand() As String
  627.     Dim strCommand As String
  628.     Dim lngResult As Long
  629.     
  630.     lngResult = IniReadByLong("ArcSetting_01", "UnGCAAllQYes")
  631.     
  632.     If lngResult = 1 Then
  633.         strCommand = " -yx0"
  634.     Else
  635.         strCommand = " -yx1"
  636.     End If
  637.     
  638.     lngResult = IniReadByLong("ArcSetting_01", "UnGCADialog")
  639.     
  640.     If lngResult = 1 Then
  641.         strCommand = strCommand & " -sx0"
  642.     Else
  643.         strCommand = strCommand & " -sx1"
  644.     End If
  645.     
  646.     UnGCACommand = "e" & strCommand
  647.     Debug.Print "UnGCACommand: " & strCommand
  648. End Property
  649. '
  650. '
  651. '
  652. Public Property Get BgaCommand() As String
  653.     Dim strCommand As String
  654.     Dim lngResult As Long
  655.     
  656.     lngResult = IniReadByLong("ArcSetting_01", "Bga32AllElement")
  657.     
  658.     If lngResult = 1 Then
  659.         strCommand = ""
  660.     Else
  661.         strCommand = " -a"
  662.     End If
  663.  
  664.     lngResult = IniReadByLong("ArcSetting_01", "Bga32IgnoreFolder")
  665.     
  666.     If lngResult = 1 Then
  667.         strCommand = strCommand & " -j"
  668.     End If
  669.     
  670.     lngResult = IniReadByLong("ArcSetting_01", "Bga32UnExistFile")
  671.     
  672.     If lngResult = 1 Then
  673.         strCommand = strCommand & " -n"
  674.     End If
  675.     
  676.     lngResult = IniReadByLong("ArcSetting_01", "Bga32OverWrite")
  677.     
  678.     If lngResult = 1 Then
  679.         strCommand = strCommand & " -o"
  680.     End If
  681.     
  682.     lngResult = IniReadByLong("ArcSetting_01", "Bga32SubSearch")
  683.     
  684.     If lngResult = 1 Then
  685.         strCommand = strCommand & " -r"
  686.     End If
  687.     
  688.     BgaCommand = "x -i" & strCommand
  689.     Debug.Print "BgaCommand: " & BgaCommand
  690. End Property
  691. '
  692. '
  693. '
  694. Public Property Get Yz1Command() As String
  695.     Dim strCommand As String
  696.     Dim lngResult As Long
  697.     
  698.     lngResult = IniReadByLong("ArcSetting_01", "Yz1AllQYes")
  699.     
  700.     If lngResult = 1 Then
  701.         strCommand = " -y"
  702.     End If
  703.     
  704.     Yz1Command = "x -i" & strCommand
  705.     Debug.Print "Yz1Command: " & strCommand
  706. End Property
  707. '
  708. '
  709. '
  710. Public Property Get TarCommand() As String
  711.     TarCommand = "-xvf"
  712. End Property
  713. '
  714. 'âèâXâgâtâ@âCâïé≡ì∞ɼé╖éΘì█üAâtâ@âCâïâTâCâYé╠Åπî└é≡ĵô╛é╡é▄é╖üB
  715. '
  716. Public Property Get GetBufferSize() As Long
  717.     Dim lngResult As Long
  718.     Dim strBufSize As String
  719.     
  720.     lngResult = IniReadByLong("ListFile", "ListFileSize")
  721.     
  722.     Select Case lngResult
  723.         Case 0
  724.             GetBufferSize = 65536
  725.         Case 1
  726.             strBufSize = IniReadByLong("ListFile", "ListFileBufSize")
  727.             If IsNumeric(strBufSize) = True Then
  728.                 GetBufferSize = CLng(strBufSize)
  729.             Else
  730.                 GetBufferSize = 65536
  731.             End If
  732.         Case Else
  733.             GetBufferSize = 65536
  734.     End Select
  735. End Property
  736. '
  737. 'âèâXâgâtâ@âCâïé╠ëⁿìsâRü[âhé╠Äφù▐é≡ĵô╛é╡é▄é╖üB
  738. '
  739. Public Property Get GetLineCode() As Long
  740.     Dim lngResult As Long
  741.     
  742.     lngResult = IniReadByLong("ListFile", "LineCode")
  743.     
  744.     Select Case lngResult
  745.         Case 0, 1, 2
  746.             GetLineCode = lngResult
  747.         Case Else
  748.             GetLineCode = 0
  749.     End Select
  750. End Property
  751. '
  752. 'âèâXâgâtâ@âCâïé≡ì∞ɼé╡é▄é╖üB
  753. '
  754. Public Sub ArcListFile(ByVal strFileName As String, ByVal hWnd As Long, ByVal strOutPut As String, ByVal lngType As Long)
  755.     Dim CArcCmd As ClsArcCmd
  756.     Set CArcCmd = New ClsArcCmd
  757.     Dim strBuffer As String
  758.     
  759.     With CArcCmd
  760.         .BufferSize = GetBufferSize
  761.         .strFileName = strFileName
  762.         .strOutPut = vbNullString
  763.         .TargethWnd = hWnd
  764.     End With
  765.     
  766.     Select Case lngType
  767.         Case 1
  768.             With CArcCmd
  769.                 .strCommand = UnlhaListCommand
  770.                 .CommandUnlha
  771.             End With
  772.         Case 2
  773.             With CArcCmd
  774.                 .strCommand = UnZipListCommand
  775.                 .CommandUnZip
  776.             End With
  777.         Case 3
  778.             With CArcCmd
  779.                 .strCommand = CabListCommand
  780.                 .CommandCab
  781.             End With
  782.         Case 8
  783.             With CArcCmd
  784.                 .strCommand = UnArjListCommand
  785.                 .CommandUnArj
  786.             End With
  787.     End Select
  788.     If CArcCmd.ResultBuffer <> "" Then
  789.         Call CreateMkDir(GetPathName(strOutPut))
  790.         Select Case lngType
  791.             Case 2
  792.                 Select Case GetLineCode
  793.                     Case 0
  794.                         strBuffer = ReplaceChar(CArcCmd.ResultBuffer, vbLf, vbCrLf)
  795.                     Case 1
  796.                         strBuffer = CArcCmd.ResultBuffer
  797.                     Case 2
  798.                         strBuffer = ReplaceChar(CArcCmd.ResultBuffer, vbLf, vbCr)
  799.                 End Select
  800.                 
  801.                 Select Case GetListFileOverWrite
  802.                     Case 0
  803.                         Call WriteFile(strBuffer, strOutPut, True)
  804.                     Case 1
  805.                         Call WriteFile(strBuffer, strOutPut, False)
  806.                 End Select
  807.             Case Else
  808.                 Select Case GetListFileOverWrite
  809.                     Case 0
  810.                         Call WriteFile(CArcCmd.ResultBuffer, strOutPut, True)
  811.                     Case 1
  812.                         Call WriteFile(CArcCmd.ResultBuffer, strOutPut, False)
  813.                 End Select
  814.         End Select
  815.     End If
  816.     
  817.     Set CArcCmd = Nothing
  818. End Sub
  819. '
  820. 'Åæî╔é╠É│ôûɽîƒì╕é≡ìséóé▄é╖üB
  821. '
  822. Public Function ArcExamFile(ByVal strFileName As String, ByVal hWnd As Long, ByVal lngType As Long) As String
  823.     Dim strBuffer As String
  824.     Dim CArcCmd As ClsArcCmd
  825.     Set CArcCmd = New ClsArcCmd
  826.     
  827.     With CArcCmd
  828.         .strFileName = strFileName
  829.         .strOutPut = vbNullString
  830.         .TargethWnd = hWnd
  831.     End With
  832.     
  833.     Select Case lngType
  834.         Case 1
  835.             CArcCmd.TestUnlha
  836.         Case 2
  837.             CArcCmd.TestUnZip
  838.         Case 3
  839.             CArcCmd.TestCab
  840.         Case 4
  841.             If CArcCmd.IsRarPass = 2 Then
  842.                 strBuffer = InputDialog("âpâXâÅü[âhôⁿù═", "âpâXâÅü[âhé≡ôⁿù═é╡é─é¡é╛é│éó", True)
  843.             End If
  844.             CArcCmd.TestRar
  845.         Case 5
  846.             CArcCmd.TestBga
  847.         Case 7
  848.             If CArcCmd.IsAcePass = 131 Then
  849.                 strBuffer = InputDialog("âpâXâÅü[âhôⁿù═", "âpâXâÅü[âhé≡ôⁿù═é╡é─é¡é╛é│éó", True)
  850.             End If
  851.             CArcCmd.TestAce
  852.         Case 8
  853.             CArcCmd.TestArj
  854.         Case 11
  855.             CArcCmd.TestTar
  856.     End Select
  857.     
  858.     mGetErrorNum = CArcCmd.GetErrorNumber
  859.     
  860.     If CArcCmd.ResultBuffer <> "" Then
  861.         ArcExamFile = "üy" & strFileName & "üz" & vbCrLf & ReplaceChar(CArcCmd.ResultBuffer, vbLf, vbCrLf) & vbCrLf
  862.     Else
  863.         ArcExamFile = "üy" & strFileName & "üz" & vbCrLf & "ü¿É│ôûɽîƒì╕é═Åoùêé▄é╣é±üB" & vbCrLf
  864.     End If
  865.     
  866.     Set CArcCmd = Nothing
  867. End Function
  868. '
  869. 'âtâ@âCâïé≡îïìçé╡é▄é╖üB
  870. '
  871. Public Sub FileCombine(ByVal strFileName As String, ByVal hWnd As Long, ByVal strOutPut As String, ByVal lngType As Long)
  872.     Dim CCmb As ClsCmbFile
  873.     Set CCmb = New ClsCmbFile
  874.     
  875.     With CCmb
  876.         .TargethWnd = hWnd
  877.         .strFileName = strFileName
  878.         .strOutPut = strOutPut
  879.     End With
  880.     
  881.     Select Case lngType
  882.         Case 50
  883.             CCmb.FileCombineJydiv1
  884.         Case 51
  885.             CCmb.FileCombineJydiv2
  886.         Case 52
  887.             CCmb.FileCombineJydiv3
  888.         Case 53
  889.             CCmb.FileCombineRiz
  890.         Case 54
  891.             CCmb.FileCombineBunkatsuKun
  892.         Case 55, 56, 57, 58
  893.             CCmb.FileCombine
  894.     End Select
  895.     
  896.     Set CCmb = Nothing
  897. End Sub
  898. '
  899. 'âtâ@âCâïé≡ë≡ôÇé╡é▄é╖üB
  900. '
  901. Public Function ArcCommand(ByVal strFileName As String, ByVal hWnd As Long, ByVal strOutPut As String, ByVal lngType As Long) As String
  902.     Dim strPassWord As String
  903.     Dim CArcCmd As ClsArcCmd
  904.     Set CArcCmd = New ClsArcCmd
  905.     Select Case lngType
  906.         Case 0, 20, 200
  907.         
  908.         Case Else
  909.             Call CreateMkDir(strOutPut)
  910.     End Select
  911.     
  912.     With CArcCmd
  913.         .strFileName = strFileName
  914.         .strOutPut = SetQuote(strOutPut)
  915.         .TargethWnd = hWnd
  916.     End With
  917.     
  918.     If lngType = 9 Then
  919.         With CArcCmd
  920.             .strFileName = GetShortPath(strFileName)
  921.             .strOutPut = GetShortPath(strOutPut)
  922.         End With
  923.     End If
  924.     
  925.     Select Case lngType
  926.         Case 1
  927.             Call SetOwnerWindow(hWnd, 1)
  928.             With CArcCmd
  929.                 .strCommand = UnlhaCommand
  930.                 .CommandUnlha
  931.             End With
  932.             Call KillOwnerWindow(hWnd, 1)
  933.         Case 2
  934.             Call SetOwnerWindow(hWnd, 2)
  935.             With CArcCmd
  936.                 .strCommand = UnZipCommand
  937.                 .CommandUnZip
  938.             End With
  939.             Call KillOwnerWindow(hWnd, 2)
  940.         Case 3
  941.             Call SetOwnerWindow(hWnd, 3)
  942.             With CArcCmd
  943.                 .strCommand = CabCommand
  944.                 .CommandCab
  945.             End With
  946.             Call KillOwnerWindow(hWnd, 3)
  947.         Case 4
  948.             If GetArcDialog = 1 Then
  949.                 CArcCmd.TargethWnd = 0
  950.             End If
  951.             If CArcCmd.IsRarPass = 2 Then
  952.                 strPassWord = InputDialog("âpâXâÅü[âhôⁿù═", "âpâXâÅü[âhé≡ôⁿù═é╡é─é¡é╛é│éó", True)
  953.             End If
  954.             With CArcCmd
  955.                 .strOutPut = strOutPut
  956.                 .CommandUnrar (strPassWord)
  957.             End With
  958.         Case 5
  959.             Call SetOwnerWindow(hWnd, 4)
  960.             With CArcCmd
  961.                 .strCommand = BgaCommand
  962.                 .CommandBga
  963.             End With
  964.             Call SetOwnerWindow(hWnd, 4)
  965.         Case 6
  966.             Call SetOwnerWindow(hWnd, 7)
  967.             With CArcCmd
  968.                 .strCommand = Yz1Command
  969.                 .CommandYz1
  970.             End With
  971.             Call KillOwnerWindow(hWnd, 7)
  972.         Case 7
  973.             If GetArcDialog = 1 Then
  974.                 CArcCmd.TargethWnd = 0
  975.             End If
  976.             If CArcCmd.IsAcePass = 131 Then
  977.                 strPassWord = InputDialog("âpâXâÅü[âhôⁿù═", "âpâXâÅü[âhé≡ôⁿù═é╡é─é¡é╛é│éó", True)
  978.             End If
  979.             With CArcCmd
  980.                 .strOutPut = strOutPut
  981.                 .CommandUnAce (strPassWord)
  982.             End With
  983.         Case 8
  984.             Call SetOwnerWindow(hWnd, 6)
  985.             With CArcCmd
  986.                 .strCommand = UnArjCommand
  987.                 .CommandUnArj
  988.             End With
  989.             Call KillOwnerWindow(hWnd, 6)
  990.         Case 9
  991.             With CArcCmd
  992.                 .strCommand = "/f="
  993.                 .CommandIsh
  994.             End With
  995.         Case 10
  996.             With CArcCmd
  997.                 .strCommand = UnGCACommand
  998.                 .CommandUnGca
  999.             End With
  1000.         Case 11
  1001.             'Call SetOwnerWindow(hWnd, 5)
  1002.             With CArcCmd
  1003.                 .strCommand = TarCommand
  1004.                 .CommandTar
  1005.             End With
  1006.             'Call KillOwnerWindow(hWnd, 5)
  1007.         Case 12
  1008.             CArcCmd.CommandLz
  1009.         Case 50, 51, 52, 53, 54, 55, 56, 57, 58
  1010.             If GetDivDialog = 1 Then
  1011.                 Call FileCombine(strFileName, 0, strOutPut & GetRevPathExt(strFileName), lngType)
  1012.             Else
  1013.                 Call FileCombine(strFileName, hWnd, strOutPut & GetRevPathExt(strFileName), lngType)
  1014.             End If
  1015.     End Select
  1016.     
  1017.     Debug.Print CArcCmd.DebugString
  1018.     Debug.Print CArcCmd.GetErrorString
  1019.     
  1020.     If CArcCmd.GetErrorNumber <> 0 Then
  1021.         ArcCommand = CArcCmd.GetErrorString
  1022.     End If
  1023.     
  1024.     Set CArcCmd = Nothing
  1025. End Function
  1026. '
  1027. 'âtâ@âCâïé≡ÆPë≡ôÇé╡é▄é╖üB
  1028. '
  1029. Public Function ArcSingleCommand(ByVal strFileName As String, ByVal hWnd As Long, ByVal strOutPut As String, Optional ByVal strResponseFile As String = "") As String
  1030.     Dim CArcCmd As ClsArcCmd
  1031.     Set CArcCmd = New ClsArcCmd
  1032.     
  1033.     Select Case lngCheckType
  1034.         Case 0, 20, 200
  1035.         
  1036.         Case Else
  1037.             Call CreateMkDir(strOutPut)
  1038.     End Select
  1039.     
  1040.     With CArcCmd
  1041.         .strFileName = strFileName
  1042.         .strOutPut = strOutPut
  1043.         .strWildCard = strResponseFile
  1044.         .TargethWnd = hWnd
  1045.     End With
  1046.     
  1047.     Select Case lngCheckType
  1048.         Case 1
  1049.             With CArcCmd
  1050.                 .strCommand = "e -a1 -x0 -m1 -u0"
  1051.                 .CommandUnlha
  1052.             End With
  1053.         Case 2
  1054.             With CArcCmd
  1055.                 .strCommand = "-x -j -o"
  1056.                 .CommandUnZip
  1057.             End With
  1058.         Case 3
  1059.             With CArcCmd
  1060.                 .strCommand = "-x -j -o"
  1061.                 .CommandCab
  1062.             End With
  1063.         Case 5
  1064.             With CArcCmd
  1065.                 .strCommand = "x -a -j -o"
  1066.                 .CommandBga
  1067.             End With
  1068.         Case 8
  1069.             With CArcCmd
  1070.                 .strCommand = "e"
  1071.                 .CommandUnArj
  1072.             End With
  1073.         Case 9
  1074.             With CArcCmd
  1075.                 .strCommand = "/Y " & strResponseFile & " /f="
  1076.                 .CommandIsh
  1077.             End With
  1078.         Case 11
  1079.             With CArcCmd
  1080.                 .strCommand = "-x"
  1081.                 .CommandTar
  1082.             End With
  1083.         Case Else
  1084.             MsgBoxEx "É\é╡û≤éáéΦé▄é╣é±é¬é▄é╛âTâ|ü[âgé│éΩé─éóé▄é╣é±üBéì(_ _)éì", vbInformation
  1085.     End Select
  1086.     
  1087.     Debug.Print CArcCmd.DebugString
  1088.         
  1089.     If CArcCmd.GetErrorNumber <> 0 Then
  1090.         ArcSingleCommand = CArcCmd.GetErrorString
  1091.     End If
  1092.     
  1093.     Set CArcCmd = Nothing
  1094. End Function
  1095. '
  1096. 'èiö[âtâ@âCâïÉöé≡ĵô╛é╡é▄é╖üB
  1097. '
  1098. Public Function GetArcCount(ByVal strFileName As String, ByVal hWnd As Long) As Long
  1099.     Dim CFile As ClsFile
  1100.     Set CFile = New ClsFile
  1101.     
  1102.     With CFile
  1103.         .strFileName = strFileName
  1104.         .TargethWnd = hWnd
  1105.     End With
  1106.     
  1107.     Select Case lngCheckType
  1108.         Case 1
  1109.             GetArcCount = CFile.GetCountUnlha
  1110.         Case 2
  1111.             GetArcCount = CFile.GetCountUnZip
  1112.         Case 3
  1113.             GetArcCount = CFile.GetCountCab
  1114.         Case 4
  1115.             GetArcCount = CFile.GetCountUnRar
  1116.         Case 5
  1117.             GetArcCount = CFile.GetCountBga
  1118.         Case 6
  1119.             GetArcCount = CFile.GetCountYz1
  1120.         Case 7
  1121.             GetArcCount = CFile.GetCountUnAce
  1122.         Case 8
  1123.             GetArcCount = CFile.GetCountUnArj
  1124.         Case 9
  1125.             GetArcCount = 0
  1126.         Case 10
  1127.             GetArcCount = CFile.GetCountUnGCA
  1128.         Case 11
  1129.             GetArcCount = CFile.GetCountTar
  1130.         Case 12
  1131.             GetArcCount = 1
  1132.     End Select
  1133.     Set CFile = Nothing
  1134.  
  1135. End Function
  1136. Public Property Get GetArcErrorNumber() As Long
  1137.     GetArcErrorNumber = mGetErrorNum
  1138. End Property
  1139. '
  1140. 'î╗ì▌é╠ô·òté╞Ä₧ìÅé≡ĵô╛é╡é▄é╖üBYYYYMMDDHHMMSS
  1141. '
  1142. Public Property Get GetNowTime() As String
  1143.     Dim CInfo As ClsSysInfo
  1144.     Set CInfo = New ClsSysInfo
  1145.     
  1146.     GetNowTime = CInfo.GetNowDateTime
  1147.     
  1148.     Set CInfo = Nothing
  1149. End Property
  1150. Public Property Get GetListFileOverWrite() As Long
  1151.     Dim lngResult As Long
  1152.     
  1153.     lngResult = IniReadByLong("ListFile", "QOverWrite")
  1154.     
  1155.     Select Case lngResult
  1156.         Case 0, 1
  1157.             GetListFileOverWrite = lngResult
  1158.         Case Else
  1159.             GetListFileOverWrite = 0
  1160.     End Select
  1161. End Property
  1162.